from django.db import models
from django.contrib.auth.models import User
from django.contrib.comments.models import Comment

class Konu(models.Model):
	baslik = models.CharField(max_length=200)
	zaman = models.DateTimeField('olusturulma zamani', auto_now_add=True)
	olusturan = User

	def __unicode__(self):
		return self.baslik

class Yorum(Comment):
	konu = models.ForeignKey(Konu)
	artiPuan=models.IntegerField(default=0)
	eksiPuan=models.IntegerField(default=0)

	def get_comment_model(self):
		return Yorum

	#def get_comment_create_data(self):
        # Use the data of the superclass, and add in the title field
    #    data = super(Yorum, self).get_comment_create_data()
     #   data['object_'] = self.cleaned_data['title']
      #  return data
